// 1. 获取数据
// 2. 用下拉列表渲染
import { useChannels } from '@/hooks/index.js'
import { Select} from 'antd'

export default function MyChannels(props) {
  const channelList = useChannels()
  return (
      <Select {...props} placeholder="请选择频道" style={{ width: 200 }}>
          {channelList.map(item => (<Select.Option key={item.id} value={item.id}>{item.name}</Select.Option> ))}
      </Select>
  )
}